<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <base th:href="@{/}">
        <script type="text/javascript" src="js/teacherPage.js"></script>
    </head>
    <body>
        <div id="template_list_head">
            <b>名称:</b><input id="filterName" type="text"/>
            <button type="button" class="btn btn-default btn-sm" onclick="template.list.select()">
                <span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span> 查询
            </button>
            <button type="button" class="btn btn-default btn-sm" onclick="template.list.clearShareTeacherQuery()">
                <span class="glyphicon glyphicon-zoom-out" aria-hidden="true"></span> 清空查询
            </button>
        </div>
        <div id="template_list_body">
            <div id="teacherContextFragment">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <td><input onclick="teacherPage.selectAll()" type="checkbox"/></td>
                        <td>序号</td>
                        <td>教师名称</td>
                        <td>助记码</td>
                        <td>创建时间</td>
                    </tr>
                    </thead>
                    <tbody>
                    <th:block th:if="${pageVO.params==null||pageVO.params.size()==0}">
                        <tr>
                            <td align="center" colspan="6">没有查询到任何信息</td>
                        </tr>
                    </th:block>
                    <th:block th:unless="${pageVO.params==null}">
                        <tr th:each="teacher:${pageVO.params}">
                            <td><input th:value="${teacher.id}" type="checkbox"/></td>
                            <td th:text="${teacher.id}"></td>
                            <td th:text="${teacher.tname}"></td>
                            <td th:text="${teacher.mnemonic_code}"></td>
                            <td th:text="${teacher.create_time}"></td>
                        </tr>
                    </th:block>
                </table>
            </div>
            <nav id="nav" aria-label="Page navigation">
                <ul class="pagination">
                    <li th:if="${pageVO.page==1} " class="disabled">
                        <a href="javascript:void(0)" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:unless="${pageVO.page==1}" >
                        <a th:onclick="|template.list.limitQuery(${pageVO.page}-1)|" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>


                    <li  th:class="${pageVO.page==index?'active':''}" th:each="index:${#numbers.sequence(pageVO.pageStart,pageVO.pageEnd)}" th:value="${index}">
                        <a th:onclick="|template.list.limitQuery(${index})|" th:text="${index}"></a>
                    </li>


                    <li th:if="${pageVO.page==pageVO.realPage}" class="disabled">
                        <a href="javascript:void(0)" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                    <li th:unless="${pageVO.page==pageVO.realPage}" >
                        <a th:onclick="|template.list.limitQuery(${pageVO.page}+1)|" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>

    </body>
</html>